//
//  common.swift
//  weibo1990
//
//  Created by 曹晓龙 on 15/10/17.
//  Copyright © 2015年 曹晓龙. All rights reserved.
//

import UIKit

/// 主题颜色
let weiboViewTinerColor = UIColor.orangeColor()

/// 切换界面通知
let WBSwiftNotificationKey = "WBSwiftNotificationKey"

/// 选中图片时通知名
let WBStatusPictureSelectedCellKey = "WBStatusPictureSelectedCellKey"

/// 传递数据时,选中的cell索引
let WBStatusPictureSelectedIndexPathKey = "WBStatusPictureSelectedIndexPathKey"

/// 传递数据时,选中的cell所有图片的url数组
let WBStatusPictureSelectedURLsKey = "WBStatusPictureSelectedURLsKey"

///  延时执行操作
///
///  - parameter delay:     延迟时间
///  - parameter callBlock: 回调方法
func dispatch(delay:Double, callBlock:()->() ){
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), { () -> Void in
        
        callBlock()
    })
}